package application.view 
{
	import application.ApplicationFacade;
	import application.model.VO.ModuleNavVO;
	import application.view.viewComponent.MainNavView;
	import org.puremvc.as3.interfaces.IMediator;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.mediator.Mediator;
	
	/**
	 * ...
	 * @author Ning
	 */
	public class MainNavMediator extends Mediator implements IMediator 
	{
		public static const NAME:String='MainNavMediator'
		public function MainNavMediator(viewComponent:MainNavView) 
		{
			super(NAME,viewComponent);
		}
		private function get mainNavView():MainNavView {
			return viewComponent as MainNavView;
		}
		override public function handleNotification(notification:INotification):void 
		{
			switch(notification.getName())
			{
				case ApplicationFacade.UPDATE_MODULE_NAV_DATA:
				mainNavView.updateData(notification.getBody() as ModuleNavVO);
				break;
			}
		}
		override public function listNotificationInterests():Array 
		{
			return [ApplicationFacade.UPDATE_MODULE_NAV_DATA]
		}
	}
}